home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
colorpgm.bas
< prev
next >
Wrap
BASIC Source File
|
1985-06-03
|
2KB
|
59 lines
5 REM
10 KEY OFF
20 OPTION BASE 0
30 COLOR 7,0,0
35 FG$="7":BG$="0":BD$="0"
40 OPEN"color.dos"FOR OUTPUT AS #1
50 DIM FGDOS$(7),BGDOS$(7)
60 FGDOS$(0)="30":BGDOS$(0)="40"
70 FGDOS$(1)="34":BGDOS$(1)="44"
80 FGDOS$(2)="32":BGDOS$(2)="42"
90 FGDOS$(3)="36":BGDOS$(3)="46"
100 FGDOS$(4)="31":BGDOS$(4)="41"
110 FGDOS$(5)="35":BGDOS$(5)="45"
120 FGDOS$(6)="33":BGDOS$(6)="43"
130 FGDOS$(7)="37":BGDOS$(7)="47"
140 CLS
160 PRINT"set basic & dos colors"
170 PRINT
180 PRINT"0 black 8 grey"
190 PRINT "1 blue 9 lt.blue"
200 PRINT "2 green 10 lt.green"
210 PRINT "3 cyan 11 lt.cyan"
220 PRINT "4 red 12 lt.red"
230 PRINT "5 magenta 13 lt.magenta"
240 PRINT "6 brown 14 yellow"
250 PRINT "7 white 15 bright wt."
260 PRINT
270 PRINT "use these colors? y/n?"
280 A$=INKEY$:IF A$="" THEN 280
290 IF A$="Y" OR A$="y" THEN 540
300 PRINT
310 LINE INPUT "text: ";A$
320 IF A$<>"" THEN FG$=A$
330 IF VAL(FG$)>15 THEN BEEP:GOTO 140
340 LINE INPUT "background: ";A$
350 IF A$<>="" THEN BG$=A$
360 IF VAL(BG$)>15 THEN BEEP:GOTO 140
370 LINE INPUT "border: ";A$
380 IF A$<>"" THEN BD$=A$
390 FG=VAL(FG$)
400 BG=VAL(BG$)
410 IF VAL(BD$)>15 THEN BEEP:GOTO 140
420 IF FG>7 THEN HI$="1;":FG=FG-8:FG$=STR$(FG):FG=FG+8 ELSE HI$="0;"
430 IF BG>7 THEN BG=BG-8:BG$=STR$(BG)
440 IF BG<>FG THEN 510
450 PRINT
460 BEEP
470 PRINT "warning"
480 PRINT "okay y/n?"
490 A$=INKEY$:IF A$=""THEN 490
500 IF A$="Y" OR A$="y" THEN 510 ELSE 140
510 COLOR FG,BG,VAL(BD$)
520 CLS
530 GOTO 140
540 PRINT #1,CHR$(27);"[";HI$;FGDOS$(VAL(FG$));";";BGDOS$(VAL(BG$));"m"
550 CLOSE
560 SYSTEM
570 END
20 C